]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dbusServices/extensions: Use regular constructors
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 22 May 2025 01:27:51 +0000 (03:27 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 1 Aug 2025 14:30:00 +0000 (16:30 +0200)
Regular constructors have worked for GObject subclasses for a couple
of years now. While there is no functional difference to _init(),
it's simply nicer to use the same syntax for all classes, so quickly
change that before doing further changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3750>
(cherry picked from commit cbdeb8076e485f71de6113537be80f26ee76151f)

js/dbusServices/extensions/extensionPrefsDialog.js

index 75687c7a876d257378f6fb4b6733ddc8cfa20246..f6061a9be6d2d7c34bb6818e83f401b192848e7c 100644 (file)
@@ -13,8 +13,8 @@ export const ExtensionPrefsDialog = GObject.registerClass({
         'loaded': {},
     },
 }, class ExtensionPrefsDialog extends Adw.PreferencesWindow {
-    _init(extension) {
-        super._init({
+    constructor(extension) {
+        super({
             title: extension.metadata.name,
             search_enabled: false,
         });
@@ -94,8 +94,8 @@ const ExtensionPrefsErrorPage = GObject.registerClass({
         return klass;
     }
 
-    _init(extension, error) {
-        super._init();
+    constructor(extension, error) {
+        super();
 
         this._addCustomStylesheet();